B = readmatrix('supercontinuum_power_calibration.csv')

x1 = B(28:120,1)
y1 = B(28:120,2)

for i=1:42
    x(i) = x1(2*i-1)
    y(i) = y1(2*i-1)
end

data = cat(2,x.',y.')
writematrix(data,'laser_power.txt')

hold on
plot(x,y,LineWidth=1,Color=[0.8 0 0])
xlim([500,750])
xticks(500:50:750)
%ylim([0,0.11])
%yticks([0:0.05:0.1])
set(gca,'XMinorTick','on','YMinorTick','on')
set(gca,'box','on','Xcolor',[0 0 0],'Ycolor',[0 0 0])
hold off
box on
set(gcf,'Position',[0, 0, 200, 200])